<?php

namespace app\common\job;

use think\queue\Job;

/**
 * create by PhpStorm 2025/8/1 14:24
 * szyc.com app\common\job@Reptile
 * 行止之行 <xingzhi8711@gmail.com>
 * 爬虫任务
 */
class Reptile
{
    private $method;
    public function fire(Job $job, $data)
    {
        $website = $data['website'];
        $method=str_replace([".","/"],"_",$website);
        $this->method=$method;
        if($this->$method()){
            $job->delete();
        }elseif($job->attempts() > 3){
            $job->delete();
        }else{
            $job->release();
        }
    }
    private function cnnc_zhiye_com()
    {
        $content=file_get_contents("http://cnnc.zhiye.com/tiqianpi");
        setLog(__METHOD__,$content);
    }
}